package com.gthncz.xxhelper.greendao;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Property;

/**
 * 题目表
 * Created by GT on 2019/11/10.
 */

@Entity(nameInDb = "tb_tiku")
public class Subject {
    @Id(autoincrement = true)
    @Property(nameInDb = "id")
    private long id; // autoincrement primary key 只能是 long
    @NotNull
    @Property(nameInDb = "question")
    private String question;
    @Property(nameInDb = "optionA")
    private String optionA;
    @Property(nameInDb = "optionB")
    private String optionB;
    @Property(nameInDb = "optionC")
    private String optionC;
    @Property(nameInDb = "optionD")
    private String optionD;
    @NotNull
    @Property(nameInDb = "answer")
    private String answer;
    @Generated(hash = 2010373542)
    public Subject(long id, @NotNull String question, String optionA,
            String optionB, String optionC, String optionD,
            @NotNull String answer) {
        this.id = id;
        this.question = question;
        this.optionA = optionA;
        this.optionB = optionB;
        this.optionC = optionC;
        this.optionD = optionD;
        this.answer = answer;
    }
    @Generated(hash = 1617906264)
    public Subject() {
    }
    public long getId() {
        return this.id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getQuestion() {
        return this.question;
    }
    public void setQuestion(String question) {
        this.question = question;
    }
    public String getOptionA() {
        return this.optionA;
    }
    public void setOptionA(String optionA) {
        this.optionA = optionA;
    }
    public String getOptionB() {
        return this.optionB;
    }
    public void setOptionB(String optionB) {
        this.optionB = optionB;
    }
    public String getOptionC() {
        return this.optionC;
    }
    public void setOptionC(String optionC) {
        this.optionC = optionC;
    }
    public String getOptionD() {
        return this.optionD;
    }
    public void setOptionD(String optionD) {
        this.optionD = optionD;
    }
    public String getAnswer() {
        return this.answer;
    }
    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Override
    public String toString() {
        return "Subject{" +
                "id=" + id +
                ", question='" + question + '\'' +
                ", optionA='" + optionA + '\'' +
                ", optionB='" + optionB + '\'' +
                ", optionC='" + optionC + '\'' +
                ", optionD='" + optionD + '\'' +
                ", answer='" + answer + '\'' +
                '}';
    }
}
